package com.ht.service.impl;

import com.ht.bean.*;
import com.ht.dao.EmpDao;
import com.ht.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EmpServiceImpl implements EmpService {
    //员工empdao
    @Autowired
    private EmpDao emp;
//    查询员工
    @Override
    public List<Map> emplist() {
        return emp.allEmp();
    }

    //判断电话号码是否存在
    @Override
    public int emp_phone(String phone) {
        return emp.emp_phone(phone);
    }

    //判断身份证是否存在
    @Override
    public int emp_cardNo(String cardNo) {
        return emp.emp_cardNo(cardNo);
    }

    //查询数据
    @Override
    public int countEmp(Emp emp1) {
        return emp.countEmp(emp1);
    }

    //查询部门
    @Override
    public List<Dep> deplist() {
        return emp.allDep();
    }

    //查询员工
    @Override
    public List<Emp> empslist() {
        return emp.emps();
    }

    //查询职务
    @Override
    public List<Post> postlist() {
        return emp.allpost();
    }

    //查询学生
    @Override
    public List<Map> stulist() {
        return emp.allstu();
    }

    //添加员工
    @Override
    public boolean empadd(Emp emp1) {
        return emp.addemp(emp1);
    }

    //分页模糊查询
    @Override
    public List<Map> listEmp(int startIndex,int pageSize,Emp emp1) {
        return emp.Emplsit(startIndex,pageSize,emp1);
    }

    //删除员工
    @Override
    public boolean delemp(Integer empId) {
        return emp.delemp(empId);
    }

    //查询id
    @Override
    public Emp updempbyid(Integer empId) {
        return emp.allempbyid(empId);
    }

    //修改员工
    @Override
    public boolean updemp(Emp emp1) {
        return emp.updemp(emp1);
    }

    //查看工作经历
    @Override
    public List<Map> joblist(Integer empId) {
        return emp.joblist(empId);
    }

    //添加工作经历
    @Override
    public boolean addjob(Job job) {
        return emp.addjob(job);
    }

    //删除工作经历
    @Override
    public boolean deljob(Integer jobId) {
        return emp.deljob(jobId);
    }

    //查询教育背景
    @Override
    public List<Map> edulist(Integer empId) {
        return emp.edulist(empId);
    }

    //添加教育背景
    @Override
    public boolean addedu(Education education) {
        return emp.addedu(education);
    }

    //删除教育背景
    @Override
    public boolean deledu(Integer collegeId) {
        return emp.deledu(collegeId);
    }

    //查询家庭联系关系
    @Override
    public List<Map> familylist(Integer empId) {
        return emp.familylist(empId);
    }

    //添加家庭联系关系
    @Override
    public boolean addfamily(Familyinfo familyinfo) {
        return emp.addfamily(familyinfo);
    }

    //删除家庭联系关系
    @Override
    public boolean delfamily(Integer familyId) {
        return emp.delfamily(familyId);
    }

    //查询员工考核
    @Override
    public List<Map> loglist(Integer empId) {
        return emp.loglist(empId);
    }

    //查询员工考核详情
    @Override
    public Map loglistbyid(Integer aduitLogId) {
        return emp.loglistbyid(aduitLogId);
    }

    //查询考核指标
    @Override
    public List<Map> modellist() {
        return emp.modellist();
    }

    //添加员工考核
    @Override
    public boolean addlog(Aduitlog aduitlog) {
        return emp.addlog(aduitlog);
    }

    //删除员工考核
    @Override
    public boolean dellog(Integer aduitLogId) {
        return emp.dellog(aduitLogId);
    }

    //查询证件
    @Override
    public List<Map> paperlist(Integer empId) {
        return emp.paperlist(empId);
    }

    //添加证件
    @Override
    public boolean addpaper(Paper paper) {
        return emp.addpaper(paper);
    }

    //删除证件
    @Override
    public boolean delpaper(Integer imgId) {
        return emp.delpaper(imgId);
    }

    //查询员工证件详情
    @Override
    public Map paperlistbyid(Integer imgId) {
        return emp.paperlistbyid(imgId);
    }

    //重置密码
    @Override
    public boolean empczmm(Integer empId) {
        return emp.czmm(empId);
    }


    //查询周报-------------------------------------------------------------------------------
    @Override
    public List<Map> weeklylsit(Integer startIndex,Integer pageSize,Weekly weekly) {
        return emp.allWeekly(startIndex,pageSize,weekly);
    }

    //查询周报ID
    @Override
    public Map weeklybyId(Integer worklogId) {
        return emp.allweeklybyid(worklogId);
    }

    //周报分页
    @Override
    public int countWeekly(Weekly weekly) {
        return emp.countWeekly(weekly);
    }

    //查询谈心记录---------------------------------------------------------------------------
    @Override
    public List<Map> cordlist(Integer startIndex, Integer pageSize, Chatrecord chatrecord) {
        return emp.allcord(startIndex,pageSize,chatrecord);
    }

    //谈心分页
    @Override
    public int countCord(Chatrecord chatrecord) {
        return emp.countCord(chatrecord);
    }

    //添加谈心内容
    @Override
    public boolean addCord(Chatrecord chatrecord) {
        return emp.addCord(chatrecord);
    }
    //删除谈心记录
    @Override
    public boolean delcord(Integer chatId) {
        return emp.delcord(chatId);
    }

    //查看历史值班表
    @Override
    public List<Weekarrange> listange() {
        return emp.listange();
    }
    //查看历史安排表分页
    @Override
    public List<Map> allange(Integer startIndex, Integer pageSize, Weekarrange weekarrange) {
        return emp.allange(startIndex,pageSize,weekarrange);
    }
    //分页查看
    @Override
    public int countange(Weekarrange weekarrange) {
        return emp.countange(weekarrange);
    }

    //历史值班统计图
    @Override
    public List<Weekarrange> countMapName() {
        return emp.countMapName();
    }

}
